LWC Datatable any possible way to remove 'select all' checkbox?

您所在的位置:网站首页 datatable remove LWC Datatable any possible way to remove 'select all' checkbox?

LWC Datatable any possible way to remove 'select all' checkbox?

#LWC Datatable any possible way to remove 'select all' checkbox?| 来源: 网络整理| 查看: 265

This is not possible as a standard. However you can create custom lightning web component with checkbox. You can refer to How to use custom LWC lightning component in lightning-datatable for detailed explanation on how to use custom LWC component in a column. With this solution you will not get select all checkbox.

Custom component HTML:

This is a very minor work-around compared to building datatable from scratch

Coming in late here OP but this is possible with standard functionality in the platform.

Include the maxRowSelection attribute within your aura lightning datatable definition defaulted to 1, pseudo:

this will remove the selectAll checkbox and transform the checkboxes to radio buttons as specified here: https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/specification.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3